package com.fanjia.demologin.controller;

import com.fanjia.demologin.entity.Sms;
import com.fanjia.demologin.util.SmsUtils;
import com.github.qcloudsms.httpclient.HTTPException;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;





@RequestMapping("/user")
@RestController
public class UserController {

    @RequestMapping("/login")
    public String login(Sms sms) throws HTTPException, IOException {
        SmsUtils.send(sms);

        return "登录成功";
    }

}
